package com.calligraphy.product.converter;

import com.calligraphy.product.common.ProductInfoOutput;
import com.calligraphy.product.model.ProductInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;

/**
 * @Author hy
 * @Date 2019/1/24 10:49
 **/
@Slf4j
public class ProductInfo2ProductInfoOutputConverter {

    public static ProductInfoOutput convert(ProductInfo productInfo){
        ProductInfoOutput productInfoOutput = new ProductInfoOutput();
        BeanUtils.copyProperties(productInfo,productInfoOutput);
        return productInfoOutput;
    }
}
